package com.shengyijie.model.object.Listobject;

import java.util.ArrayList;
import java.util.List;   

import com.shengyijie.model.object.baseobject.Category;
import com.shengyijie.model.object.baseobject.Project;
import com.shengyijie.model.object.baseobject.PushMessage;
 

public class ProjectList {

	private int count;
	private int isTuijian=0;
	private List<Project> list;
	
	public ProjectList(){
		list=new ArrayList<Project>();
		count=0;
	}
	
	 
	public void clear(){
		list.clear();
		count=0;
	}
	public int addItem(Project item){
		list.add(item);
		count++;
		return count;
	}
	
	public int addItemToFirst(Project item){
		try{
			List<Project> temp=new ArrayList<Project>();
			for(int i=0;i<list.size();i++){
				temp.add(list.get(i));
			}
			list.clear();
			list.add(item);
			for(int i=0;i<temp.size();i++){
				list.add(temp.get(i));
			} 
			count++;
		}catch(Exception e){}
		
		return count;
	}
	
	public Project getItem(int index){
		return list.get(index);
	} 
	
	public List<Project> getAllItems()
	{
		return list;
	}
	
	public int getCount(){
		return count;
	}


	public int getIsTuijian() {
		return isTuijian;
	}


	public void setIsTuijian(int isTuijian) {
		this.isTuijian = isTuijian;
	}
	
	
	 

	 
}
